package com.zhou.blog.utils;

import com.zhou.blog.dao.pojo.SysUser;

/**
 * @title:UserThreadLocal
 * @Author Zhou
 * @Date:2022/5/1 17:07
 * @Version 1.0
 */
public class UserThreadLocal {
    private UserThreadLocal(){}

    private static final ThreadLocal<SysUser> LOCAL = new ThreadLocal<>();

    public static void put(SysUser sysUser){
        LOCAL.set(sysUser);
    }

    public static SysUser get(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }


}
